package com.jianguozh.difs.support.service.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.jianguozh.difs.framework.base.BaseEntity;
import com.jianguozh.difs.support.service.component.setting.Setting;
import com.jianguozh.difs.support.service.constant.enums.ConfigTypeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 配置
 *
 * @author hanrs
 * @email 4076130@qq.com
 * @since 2022/7/5 13:38
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "sup_config", autoResultMap = true) //有字段是json类型时autoResultMap = true一定要加
public class Config extends BaseEntity<Config> {

    /**
     * 类型
     */
    private ConfigTypeEnum configType;

    /**
     * 设置内容
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Setting setting;

    /**
     * 描述
     */
    private String description;

}
